# coding: utf8

import os
import sys


fname = "tlog.log"
file = open(fname)
print(file)
uid_set = set()
lines = file.readlines()
for line in lines:
    #print(line)
    pos_begin = line.find('"role_id"')
    if pos_begin >= 0:
        pos_end = line.find(',', pos_begin + 9)
        print(line[pos_begin + 10:pos_end])
        uid_set.add(line[pos_begin + 10:pos_end])

print(uid_set)
for uid in uid_set:
    print(uid)